﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<SubsidyApp.Models.BasesDescription.site_model>" %>
<table>
    <tr>
        <th>
            Title
        </th>
        <th>
            Zone
        </th>
        <th>
            Category
        </th>
        <th>
            Approved
        </th>
    </tr>
    <%        
        foreach (var elem in ViewData.Model.modelcontent as IQueryable<site_content>)
        {
    %>
    <tr>
        <td>
            <%= Html.ActionLink(elem.content_title, "Edit", new { category = ViewData.Model.type, id = elem.id }) %>
        </td>
        <td>
            <%= Html.Encode(elem.site_distribution.site_zone.zone_title) %>
        </td>
        <td>
            <%=Html.Encode(elem.site_distribution.distrid_title) %>
        </td>
        <td>
            <%= Html.Encode(elem.content_approved) %>
        </td>
        <td style="width:20px;">
            <% using (Html.BeginForm("Delete", "Admin", new { id = elem.id, category = ViewData.Model.type }))
               { %>
            <input type="image" src="<%= AppHelper.ImgUrl("delete_16.png") %>" />
            <% } %>
        </td>
    </tr>
    <%
        }
    %>
</table>
